/**
 * 开发任务类型常量定义
 */

// 任务类型枚举：1:新功能 2:优化 3:Bug修复 4:其他
export enum MISSION_TYPE {
  NEW_FEATURE = 1,
  OPTIMIZATION = 2,
  BUG_FIX = 3,
  OTHER = 4
}

// 任务类型列表
export const MISSION_TYPE_LIST = [
  {
    value: MISSION_TYPE.NEW_FEATURE,
    label: '新功能',
    type: 'success'
  },
  {
    value: MISSION_TYPE.OPTIMIZATION,
    label: '优化',
    type: 'warning'
  },
  {
    value: MISSION_TYPE.BUG_FIX,
    label: 'Bug修复',
    type: 'danger'
  },
  {
    value: MISSION_TYPE.OTHER,
    label: '其他',
    type: 'info'
  }
];

// 任务类型映射
export const MISSION_TYPE_MAP = MISSION_TYPE_LIST.reduce((acc, item) => {
  acc[item.value] = item;
  return acc;
}, {});

// 任务类型名称映射
export const MISSION_TYPE_NAMES = MISSION_TYPE_LIST.reduce((acc, item) => {
  acc[item.value] = item.label;
  return acc;
}, {});
